import { message } from 'ant-design-vue';



function success(str,duration){
    message.success({
        content: () => str,
        duration:duration?duration:3,
        class: 'custom-class-success',
        style: {
          color : '#52C41A',
        },
    });
}
function info(str,duration){
    message.info({
        content: () => str,
        duration:duration?duration:3,
        class: 'custom-class-info',
        style: {
          color : '#1890FF',
        },
    });
}
function error(str,duration){
    message.error({
        content: () => str,
        duration:duration?duration:3,
        class: 'custom-class-error',
        style: {
          color : '#F5222D',
        },
    });
}
function warning(str,duration){
    message.warning({
        content: () => str,
        duration:duration?duration:3,
        class: 'custom-class-warning',
        style: {
          color : '#FA8C16',
        },
    });
}
export default {
    success,
    info,
    error,
    warning
}